package com.gao.service.impl;

import com.gao.pojo.User;
import com.gao.mapper.UserMapper;
import com.gao.service.UserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gao.vo.UserClas;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author GaoHuoHuo
 * @since 2020-03-14
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {
    @Autowired
    private UserMapper userMapper;
    @Override
    public PageInfo<UserClas> selUserClasPage(int pagenum, int pagesize) {
        PageHelper.startPage (pagenum,pagesize );
        List<UserClas> clasList = userMapper.selAllByUserClas ();

        PageInfo<UserClas> info = new PageInfo<> (clasList);
        return info;
    }

    @Override
    public List<User> selUsers(String str) {
         int i=1/0;

        return userMapper.selectList ( null );
    }
}
